import http from "@/utils/request"

export default {
	dept: {
		add: {
			url: '/manage/dept/add',
			name: "新增部门",
			post: function (data) {
				return http.post(this.url, data);
			}
		},
		remove: {
			url: '/manage/dept/remove',
			name: "删除部门",
			delete: function (data) {
				return http.delete(this.url, data);
			}
		},
		edit: {
			url: '/manage/dept/edit',
			name: "新增部门",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		list: {
			url: '/manage/dept/list',
			name: "部门列表",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		changeStatus: {
			url: '/manage/dept/changeStatus',
			name: "修改状态",
			put: function (data) {
				return http.put(this.url, data);
			}
		}
	},
	user: {
		add: {
			url: '/manage/user/add',
			name: "新增用户",
			post: function (data) {
				return http.post(this.url, data);
			}
		},
		remove: {
			url: '/manage/user/remove',
			name: "删除用户",
			delete: function (data) {
				return http.delete(this.url, data);
			}
		},
		edit: {
			url: '/manage/user/edit',
			name: "编辑用户",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		page: {
			url: '/manage/user/page',
			name: "用户分页",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		list: {
			url: '/manage/user/list',
			name: "用户列表",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		resetPwd: {
			url: '/manage/user/resetPwd',
			name: "重置密码",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		changeStatus: {
			url: '/manage/user/changeStatus',
			name: "修改状态",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		updateInfo: {
			url: '/manage/user/updateInfo',
			name: "修改个人信息",
			put: function (data = {}) {
				return http.put(this.url, data);
			}
		},
		updatePwd: {
			url: '/manage/user/updatePwd',
			name: "修改密码",
			put: function (data = {}) {
				return http.put(this.url, data);
			}
		}
	},
	role: {
		add: {
			url: '/manage/role/add',
			name: "新增角色",
			post: function (data) {
				return http.post(this.url, data);
			}
		},
		remove: {
			url: '/manage/role/remove',
			name: "删除角色",
			delete: function (data) {
				return http.delete(this.url, data);
			}
		},
		edit: {
			url: '/manage/role/edit',
			name: "编辑角色",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		page: {
			url: '/manage/role/page',
			name: "角色分页",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		list: {
			url: '/manage/role/list',
			name: "角色列表",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		changeStatus: {
			url: '/manage/role/changeStatus',
			name: "修改状态",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		getPermission: {
			url: '/manage/role/permission/',
			name: "权限详情",
			get: function (id) {
				return http.get(this.url + id);
			}
		},
		savePermission: {
			url: '/manage/role/permission',
			name: "设置授权",
			post: function (data) {
				return http.post(this.url, data);
			}
		}
	},
	post: {
		add: {
			url: '/manage/post/add',
			name: "新增岗位",
			post: function (data) {
				return http.post(this.url, data);
			}
		},
		remove: {
			url: '/manage/post/remove',
			name: "删除岗位",
			delete: function (data) {
				return http.delete(this.url, data);
			}
		},
		edit: {
			url: '/manage/post/edit',
			name: "编辑岗位",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		page: {
			url: '/manage/post/page',
			name: "岗位分页",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		changeStatus: {
			url: '/manage/post/changeStatus',
			name: "修改状态",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		list: {
			url: '/manage/post/list',
			name: "岗位列表",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
	},
	permission: {
		add: {
			url: '/manage/permission/add',
			name: "新增权限",
			post: function (data) {
				return http.post(this.url, data);
			}
		},
		remove: {
			url: '/manage/permission/remove',
			name: "删除权限",
			delete: function (data) {
				return http.delete(this.url, data);
			}
		},
		edit: {
			url: '/manage/permission/edit',
			name: "编辑权限",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		list: {
			url: '/manage/permission/list',
			name: "权限列表",
			get: function (params) {
				return http.get(this.url, params);
			}
		},
		changeStatus: {
			url: '/manage/permission/changeStatus',
			name: "修改状态",
			put: function (data) {
				return http.put(this.url, data);
			}
		},
		oneself: {
			url: '/manage/permission/oneself',
			name: "获取我的菜单",
			get: function () {
				return http.get(this.url);
			}
		}
	}
}
